#! /bin/bash

# Remove comment line and sort.
grep -v '^#.*$' ../src/org/toedo/gui/translations/messages_fr.properties | sort > /tmp/a.tmp
grep -v '^#.*$' ../src/org/toedo/gui/translations/messages.properties | sort > /tmp/b.tmp

# Only keep key values
cut -d "=" -f1 /tmp/a.tmp > /tmp/a1.tmp
cut -d "=" -f1 /tmp/b.tmp > /tmp/b1.tmp

# Make the diff
diff -w -B /tmp/a1.tmp /tmp/b1.tmp > /tmp/messages.patch

# Patch
patch ../src/org/toedo/gui/translations/messages_fr.properties < /tmp/messages.patch
